<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;

class ModelMaster extends Model
{
    use SoftDeletes;

    protected $table = 'model_master';


    public function getYearIdAttribute()
    {
        $make = MakeMaster::find($this->make_id);
        return @$make->year_id;
    }

    public function make_master()
    {
        return $this->belongsTo('App\Models\MakeMaster', 'make_id');
    }

}
